home *** CD-ROM | disk | FTP | other *** search
- 10 poke53280,0:poke53281,10:poke646,0:poke53272,31
- 12 dv=peek(186):ifdv<8thendv=8
- 20 :
- 30 rem title screen
- 40 :
- 50 print"[147][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223]";
- 60 print"[223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][146]";
- 70 print"[169][223] [169][223]";
- 80 print"[223][169][146] [176][176][174][176][174][174][178][176][192][174][176] [174][176][178][174][176][192][174][174] [169][223][146]";
- 90 print"[169][223] [221][221] [221][221][221][221][221] [221] [221] [221] [221] [169][223]";
- 100 print"[223][169][146] [171][177][174][221][221][221][221][221] [174][171][192][179] [221] [173][192][174] [223][169][146]";
- 110 print"[169][223] [221] [221][221][221][221][221][221] [221][221] [221] [221] [221] [169][223]";
- 120 print"[223][169][146] [173] [189][173][173][189][177][173][192][189][173] [189] [177] [173][192][189] [223][169][146]";
- 130 print"[169][223] [176][192][174][176][174][176][176][192][174][176] [174][176][192][174][176][174][174][176][192][174][176][192][174] [169][223]";
- 140 print"[223][169][146] [221] [221][221][221] [221] [221][221] [221][221][221][221][221] [221] [223][169][146]";
- 150 print"[169][223] [171][192] [176][219][189][221] [171][192][179][171][192][179][221][221][221][221] [174][171][192] [169][223]";
- 160 print"[223][169][146] [221] [221][221] [221] [221] [221][221] [221][221][221][221][221] [221][221] [223][169][146]";
- 170 print"[169][223] [173][192][189][189][173][189][173][192][189][173] [189][173] [189][173][173][189][173][192][189][173][192][189] [169][223]";
- 180 print"[223][169][146] [176][192][192][174][176] [174][176][192][192][174][176][192][192][174][176][192][192][174] [223][169][146]";
- 190 print"[169][223] [221] [171][192][192][179][171][192] [173][192][192][174][173][192][192][174] [169][223]";
- 200 print"[223][169][146] [173][192][192][189][173] [189][173][192][192][189][173][192][192][189][173][192][192][189] [223][169][146]";
- 210 print"[169][223] [176][192][174][176] [174][176][192][174][176][192][174][176] [176][192][174] [169][223]";
- 220 print"[223][169][146] [171][192][189][221] [221][176][192][189][176][192][189][221] [171][192] [223][169][146]";
- 230 print"[169][223] [173] [173][192][189][173][192][189][173][192][189][173][192][189][173][192][189] [169][223]";
- 240 print"[223][169][146] [223][169][146]";
- 250 print"[169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223]";
- 260 print"[223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169][223][169]";
- 270 fori=1to2:print" [146]";:next
- 280 print" [157][148] "
- 290 tq=0:poke53370,0
- 292 tq=tq+1:geta$:ifa$=""andtq<200then292
- 294 poke53371,0
- 298 gosub1290
- 300 :
- 310 rem instruction screen
- 320 :
- 330 dv=peek(186):ifdv<8thendv=8
- 332 poke53281,10:poke53280,0:s=53248
- 334 print"[147][144] [212]o begin, two white knights occupy the"
- 340 print" upper corners while two black knights"
- 350 print" occupy the lower corners of a three by"
- 360 print" three square gameboard grid."
- 370 print" [176][192][192][192][192][178][192][192][192][192][178][192][192][192][192][174]"
- 380 fori=1to3:print" [221] [221] [221] [221]":next
- 390 print" [171][192][192][192][192][219][192][192][192][192][219][192][192][192][192][179]"
- 400 fori=1to3:print" [221] [221] [221] [221]":next
- 410 print" [171][192][192][192][192][219][192][192][192][192][219][192][192][192][192][179]"
- 420 fori=1to3:print" [221] [221] [221] [221]":next
- 430 print" [173][192][192][192][192][177][192][192][192][192][177][192][192][192][192][189]"
- 440 print" [212]he objective is to end the game with"
- 450 print" the corner positions of the white and"
- 460 print" black knights exchanged[144] using only the"
- 470 print" nine cells and the knight's chess move.";
- 480 pokes+2,132:pokes+3,100:pokes+4,212:pokes+5,100
- 490 pokes+6,132:pokes+7,164:pokes+8,212:pokes+9,164
- 500 pokes+21,30:print" [208]ress any key to begin.";
- 510 geta$:ifa$=""then510
- 512 pokes+21,0
- 520 :
- 530 rem gameboard screen
- 540 :
- 550 print"[147]";:poke53281,0:poke53280,10:poke646,10
- 560 print" [146] [198][210][207][205] [212][207] [198][210][207][205] [212][207]"
- 570 print" [150] [176][192][192][192][192][178][192][192][192][192][178][192][192][192][192][174] [146]"
- 580 print" [150] [221]1 [150][146][221]2 [150][146][221]3 [150][146][221][146] [146]"
- 590 fori=1to2: print" [150] [221] [150][146][221] [150][146][221] [150][146][221] [146]":next
- 600 print" [150] [171][192][192][192][192][219][192][192][192][192][219][192][192][192][192][179] [146]"
- 610 print" [150] [221]4 [150][146][221]5 [150][146][221]6 [150][146][221] [146]"
- 620 fori=1to2: print" [150] [221] [150][146][221] [150][146][221] [150][146][221] [146]":next
- 630 print" [150] [171][192][192][192][192][219][192][192][192][192][219][192][192][192][192][179] [146]"
- 640 print" [150] [221]7 [150][146][221]8 [150][146][221]9 [150][146][221] [146]"
- 650 fori=1to2: print" [150] [221] [150][146][221] [150][146][221] [150][146][221] [146]":next
- 660 print" [150] [173][192][192][192][192][177][192][192][192][192][177][192][192][192][192][189] [146]"
- 670 print" [146]"
- 680 fori=1to2:print" [146]":next
- 690 fori=1to6:print" [146]":next
- 700 print" [146]";
- 710 print" [157][148] "
- 712 poke214,15:print:print"[150] [208]ress [209] to [209]uit
- 720 :
- 730 [143] sprite positioning
- 740 :
- 750 s[178]53248:[151]s[170]2,52:[151]s[170]3,68:[151]s[170]4,132:[151]s[170]5,68
- 760 [151]s[170]6,52:[151]s[170]7,132:[151]s[170]8,132:[151]s[170]9,132
- 770 [151]s[170]21,30
- 780 :
- 790 [143] set variables
- 800 :
- 810 [134] t(16),f(16):m[178]1:mp[178]1088:s$[178]" "
- 820 [129]i[178]1[164]16:[135]n:f(i)[178][181](n[173]10):t(i)[178]n[171]10[172]f(i):[130]
- 830 p[178]1747:[141]1140:[153]"cont(NULL)ove (NULL)umber:"
- 840 p[178]1984:[141]1140:[153]"def chr$oal: peek(NULL)atnlen(NULL) on (NULL)op (NULL)left$right$(NULL)val at peekottom"
- 850 [129]i[178]1[164]9:c(i)[178]0:[130]:c(1)[178]1:c(3)[178]2:c(7)[178]3:c(9)[178]4
- 860 [129]i[178]1[164]7[169]3:x(i)[178]52:x(i[170]1)[178]92:x(i[170]2)[178]132:[130]
- 870 [129]i[178]1[164]3:y(i)[178]68:y(i[170]3)[178]100:y(i[170]6)[178]132:[130]
- 880 :
- 890 [143] input move
- 900 :
- 910 p[178]1759:[141]1140:[153]""m
- 920 [151]198,0:p[178]1784:[141]1140:[153]s$;:p[178]1824:[141]1140:[153]s$;
- 930 p[178]1788:[141]1140:[153]"cont(NULL)ove ascrom: cmd";:[141]1210:f$[178]g$
- 940 f[178][197](f$):[139]f[179]1[176]f[177]9[167]1010
- 950 [151]198,0:p[178]1824:[141]1140:[153]s$;
- 960 p[178]1829:[141]1140:[153]"cont(NULL)ove (NULL)o: cmd";:[141]1210:t$[178]g$
- 970 t[178][197](t$):[139]t[179]1[176]t[177]9[167]1010
- 980 [139]c(f)[178]0[176]c(t)[179][177]0[167]1010
- 990 [129]i[178]1[164]16:[139]f[178]f(i)[175]t[178]t(i)[167]1030
- 1000 [130]i
- 1010 p[178]1864:[141]1140:[153]" (NULL)ove (NULL)ot (NULL)ossible!";:[129]i[178]1[164]2000:[130]
- 1020 [141]1140:[153]s$;:[137]920
- 1030 p[178]mp:[141]1140:[153]f" "t:m[178]m[170]1:mp[178]mp[170]40:[139]mp[178]1968[167]mp[178]1097
- 1040 [139]mp[178]1937[167]mp[178]1088:[141]1360
- 1050 :
- 1060 [143] move knight
- 1070 :
- 1080 [129]i[178]x(f)[164]x(t)[169]([180](x(t)[171]x(f))):[151]s[170]2[172]c(f),i:[130]
- 1090 [129]i[178]y(f)[164]y(t)[169]([180](y(t)[171]y(f))):[151]s[170]2[172]c(f)[170]1,i:[130]
- 1100 c(t)[178]c(f):c(f)[178]0:[141]1400:[137]910
- 1110 :
- 1120 [143] cursor position subroutine
- 1130 :
- 1140 p[178]p[171]1024:[153]"";:py[178][181](p[173]40):px[178]p[171]40[172]py
- 1150 [139]py[179][177]0[167][129]pp[178]1[164]py:[153]"";:[130]
- 1160 [139]px[179][177]0[167][129]pp[178]1[164]px:[153]"";:[130]
- 1170 p[178]p[170]1024:[142]
- 1180 :
- 1190 [143] get subroutine
- 1200 :
- 1210 [151]198,0
- 1220 [151]204,0:[151]207,0
- 1230 [161]g$:[139]g$[178]""[167]1220
- 1240 [139]g$[178]"q"[167][151]204,1:[137]1430
- 1250 [153]""g$:[151]204,1:[142]
- 1260 :
- 1270 [143] sprite creation subroutine
- 1280 :
- 1290 s[178]53248:[129]i[178]0[164]62:[135]n:[151]832[170]i,n:[130]
- 1300 [151]2041,13:[151]2042,13:[151]2043,13:[151]2044,13
- 1310 [151]s[170]40,1:[151]s[170]41,1:[151]s[170]42,0:[151]s[170]43,0
- 1320 [142]
- 1330 :
- 1340 [143] erase moves subroutine
- 1350 :
- 1360 p[178]1088:[129]i[178]1[164]22:[141]1140:[153]" ":p[178]p[170]40:[130]:[142]
- 1370 :
- 1380 [143] game check subroutine
- 1390 :
- 1400 [139]c(1)[177]2[175]c(3)[177]2[175]c(7)[177]0[175]c(7)[179]3[175]c(9)[177]0[175]c(9)[179]3[167]1420
- 1410 [142]
- 1420 p[178]1784:[141]1140:[153]"sys lenongratulations!"
- 1430 [151]214,19:[153]:[153]"cont(1cont) atngain "
- 1432 [153]"(2cont) (NULL)o (NULL)(NULL)atn(NULL)(NULL)(NULL)
- 1440 poke198,0
- 1442 geta$:ifa$=""then1442
- 1444 ifa$="1"thenpokes+21,0:run298
- 1446 ifa$="2"thenpokes+21,0:goto4000
- 1470 :
- 1480 rem sprite data
- 1490 :
- 1500 data 0,0,0,0,31,192,0,127,96,0,255,112,1,247,248,1,253,252,3,255,62,3
- 1510 data 255,154,3,255,204,3,255,192,1,255,192,1,255,128,0,255,0,0,255,0,0,255
- 1520 data 0,0,255,0,1,255,128,15,255,240,31,255,248,15,255,240,0,0,0
- 1530 data 16,18,27,29,34,38,43,49,61,67,72,76,81,83,92,94
- 4000 print"[147]":poke53281,0
- 4010 poke214,12:print:printtab(8)"[159][204]oading [195][200][197][211][211] [209][213][193][210][212][207]"
- 4020 print"[144] load"chr$(34)"b.chess quarto"chr$(34)","dv
- 4030 print" run"
- 4040 poke631,13:poke632,13:poke198,2:end
- 10000 d=peek(186):n$="knights ex":open15,d,15,"s0:"+n$:close15:saven$,d:end
-